home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / basic / bastips2.zip / NOPRTSC.TXT < prev    next >
Text File  |  1986-07-02  |  3KB  |  65 lines

  1.                        IBM PrtSc Protector
  2.        (COMPUTE! Magazine February 1986 by Marc Sugiyama)
  3.  
  4.      One major complaint with the IBM PC keyboard is the position of
  5. the PrtSc key.  If your finger goes astray and accidentally hits both
  6. Shift and PrtSc, the PC dumps the screen to the printer.  Its annoying
  7. particularly when you're printing a long document of when you don't
  8. have a printer attached.  If there's no printer, the PC locks up until
  9. it figures out that there's nothing to print to.
  10.  
  11.      Nevertheless, it's nice to have the screen dump capability handy
  12. when you need it.  You wouldn't want to complete disable the function,
  13. but it would be nice if it were harder to call by accident.
  14.  
  15.      "PrtSc Protector" offers a good compromise.  It's a short machine
  16. language program that patches into the PrtSc function and distinguishes
  17. between the two Shift keys.  If you press the right Shift key with
  18. PrtSc, nothing happens.  If you press the left Shift key with PrtSc,
  19. you get the screen dump you really wanted.
  20.  
  21.      NOPRTSC.BAS creates the machine language file NOPRTSC.COM.  You
  22. activate NOPRTSC.COM simply by typing NOPRTSC at the DOS prompt.  The
  23. resident portion of NOPRTSC.COM takes 280 bytes of memory.
  24.  
  25.      If you want to dump graphics screen to the printer, install
  26. NOPRTSC.COM after installing GRAPHICS.COM.  Don't try to install
  27. GRAPHICS.COM more than once, or the computer will crash.  Likewise,
  28. don't try to install NOPRTSC.COM more than once.  When NOPRTSC.COM is
  29. installed successfully, it returns a zero in the ERRORLEVEL variable;
  30. otherwise, it returns a one.
  31.  
  32. 10 'NOPRTSC.BAS
  33. 100 CLS:LOCATE 10,10:PRINT"Writing file ..."
  34. 110 OPEN "NOPRTSC.COM" FOR OUTPUT AS #1
  35. 120 FOR I=1 TO 279:READ BYTE:CKSUM=CKSUM+BYTE
  36. 130 PRINT #1,CHR$(BYTE);
  37. 140 NEXT I:CLOSE 1
  38. 150 IF CKSUM<>25301 THEN PRINT"Error in data statements.":END
  39. 160 PRINT:PRINT"NOPRTSC.COM created.":END
  40. 200 DATA 233,171,0,80,97,117,108,80,83,81,82,86
  41. 210 DATA 87,85,180,2,205,22,168,2,116,6,156,154
  42. 220 DATA 0,0,0,0,93,95,94,90,89,91,88,207
  43. 230 DATA 80,114,111,116,101,99,116,101,100,32,80,114
  44. 240 DATA 116,83,99,32,105,110,115,116,97,108,108,101
  45. 250 DATA 100,46,32,32,83,104,105,102,116,45,80,114
  46. 260 DATA 116,83,99,32,117,115,105,110,103,32,114,105
  47. 270 DATA 103,104,116,45,115,104,105,102,116,32,100,105
  48. 280 DATA 115,97,98,108,101,100,46,13,10,36,80,114
  49. 290 DATA 111,116,101,99,116,101,100,32,80,114,116,83
  50. 300 DATA 99,32,97,108,114,101,97,100,121,32,105,110
  51. 310 DATA 115,116,97,108,108,101,100,46,13,10,36,82
  52. 320 DATA 101,113,117,105,114,101,115,32,68,79,83,32
  53. 330 DATA 50,46,48,32,111,114,32,97,98,111,118,101
  54. 340 DATA 46,13,10,36,0,0,180,48,205,33,60,0
  55. 350 DATA 117,9,186,143,1,180,9,205,33,205,32,187
  56. 360 DATA 36,1,177,4,211,235,67,137,30,172,1,184
  57. 370 DATA 5,53,205,33,137,30,24,1,140,6,26,1
  58. 380 DATA 190,3,1,141,127,252,185,4,0,252,243,166
  59. 390 DATA 131,249,0,116,33,180,9,186,36,1,205,33
  60. 400 DATA 184,5,37,186,7,1,205,33,161,44,0,142
  61. 410 DATA 192,180,73,205,33,184,0,49,139,22,172,1
  62. 420 DATA 205,33,186,106,1,180,9,205,33,184,1,76
  63. 430 DATA 205,33,0
  64.  
  65.